<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace app\controller;
/**
 * 控制器基础类
 */
abstract class BaseController
{
    //初始化进行登录验证
    public function __construct()
    {
        $admin = session('admin');
        //检测是否登录
        if (!$admin) {
            redirect('login/index');
        }
    }
}
